import sqlite3

'''
1.查询
2.排序
'''


class FoodSqlite3Lib(object):

    def __init__(self) -> object:
        self.conn = sqlite3.connect('../database/food.db')

    def select_name_all(self):

        for row in self.conn.execute('select NAME from food '):
            self.rows += row

    def select_kcal_by_name(self, name_spec):

        for row in self.conn.execute('select  from food where name=:name_spec', {'name_spec': name_spec}):
            print(row)

    def select_


if __name__ == '__main__':
    food = FoodSqlite3Lib()
    food.select_kcal_by_name('丁香')
